Finding Mathematica definitions

This will simply recognize definitions made with ``:=''. «*»= procedure main(args) go() end «*»= procedure postpass(name, arg) static kind, s initial kind := "bogus"; s := &null case name of "begin" : arg ? kind := tab(upto(' ')|0) "text" : if kind == "code" then arg ? s := tab(find(":=")) if then s ? tab(many(' ')) writedefn(tab(many(&letters))) s := &null return end

procedure prepass(name, arg) if name == "end" then writedefn(&null) # force newline end